package cn.gson.work.model.pojos;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Phase {
    private long phId;
    private Long sId;
    private String phName;

    @Id
    @Column(name = "PH_ID")
    public long getPhId() {
        return phId;
    }

    public void setPhId(long phId) {
        this.phId = phId;
    }

    @Basic
    @Column(name = "S_ID")
    public Long getsId() {
        return sId;
    }

    public void setsId(Long sId) {
        this.sId = sId;
    }

    @Basic
    @Column(name = "PH_NAME")
    public String getPhName() {
        return phName;
    }

    public void setPhName(String phName) {
        this.phName = phName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Phase phase = (Phase) o;
        return phId == phase.phId &&
                Objects.equals(sId, phase.sId) &&
                Objects.equals(phName, phase.phName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(phId, sId, phName);
    }
}
